<?php

declare(strict_types=1);

namespace App\Model\Goods;

use App\Model\Model;
use App\Traits\Model\Goods\GoodImage as GoodImageTraits;

/**
 * @property int $id 
 * @property int $good_id 商品ID
 * @property string $image 图片
 * @property int $sort 排序
 * @property \Carbon\Carbon $created_at 
 * @property \Carbon\Carbon $updated_at 
 */
class GoodImage extends Model
{
    use GoodImageTraits;

    /**
     * The table associated with the model.
     */
    protected ?string $table = 'good_image';

    /**
     * The attributes that are mass assignable.
     */
    protected array $fillable = ['id', 'good_id', 'image', 'sort', 'created_at', 'updated_at'];

    /**
     * The attributes that should be cast to native types.
     */
    protected array $casts = ['id' => 'integer', 'good_id' => 'integer', 'sort' => 'integer', 'created_at' => 'datetime', 'updated_at' => 'datetime'];

    /**
     * 隐藏字段
     * @var array|string[]
     */
    protected array $hidden = [
        'id',
        'good_id',
        'sort',
        'created_at',
        'updated_at'
    ];
}
